<div class="maintop">当前位置：文章分类列表
    <a href="javascript:;" action="<?=$basepath?>_add" class="mainFrame button icon-plus">添加</a>
    <a href="javascript:;" action="<?=$basepath?>" class="mainFrame button">刷新</a>
    <? if(ISDEBUG){ ?>
        <a href="javascript:$('.debuginfo').toggle();" class="button">调试信息</a>
    <? } ?>
</div>
<div id="mainbody">
    <div class="info">
        <div id="infos1">
            <table width="100%" class="tablist" id="list">
                <tr class="trbg">
                    <th width="50">ID</th><th>名称</th><th>图示</th><th>说明</th><th>链接</th><th>状态</th><th>排序</th><th width="80">操作</th>
                </tr>
                <?php
                foreach ($datas as $vr) {
                    ?>
                    <tr class="titbg">
                        <td><? echo $vr["id"] ?></td>
                        <td style="text-align: left;font-weight:700"> <i class="icon-folder-open-empty"></i><? echo $vr['title'] ?></td>
                        <td><?= (trim($vr['icon']) !== '#' ? '<img src="' . $vr['icon'] . '" height="20" />' : '') ?></td>
                        <td><? echo $vr['explain'] ?></td>
                        <td><? echo $vr['url'] ?></td>
                        <td><a href="<?=$basepath?>_state?id=<?=$vr['id']?>" target="ajax" func="loadpage" class="upbutton state<?=$vr['state']?>"><?=$vr['state']?'启用':'禁用' ?></a></td>
                        <td><? echo $vr['sort'] ?></td>
                        <td>
                            <a action="<?=$basepath?>_delete?id=<?=$vr['id']?>" title="删除" class="mainFrame button icon-trash-2" href="javascript:;"></a>
                            <a action="<?=$basepath?>_edit?id=<?=$vr['id']?>" title="编辑" class="mainFrame button icon-edit" href="javascript:;"></a>
                        </td>
                    </tr>
                    <?
                    if($vr['sub']){
                        foreach ($vr['sub'] as $v) {
                        ?>
                        <tr>
                            <td><? echo $v["id"] ?></td>
                            <td style="text-align: left;padding-left:20px"> <i class="icon-angle-right"></i><? echo $v['title'] ?></td>
                            <td><?= (trim($v['icon']) !== '#' ? '<img src="' . $v['icon'] . '" height="20" />' : '') ?></td>
                            <td><? echo $v['explain'] ?></td>
                            <td><? echo $v['url'] ?></td>
                            <td><a href="<?=$basepath?>_state?id=<?=$v['id']?>" target="ajax" func="loadpage" class="upbutton state<?=$v['state']?>"><?=$v['state']?'启用':'禁用' ?></a></td>
                            <td><? echo $v['sort'] ?></td>
                            <td>
                                <a action="<?=$basepath?>_delete?id=<?=$v['id']?>" title="删除" class="mainFrame button icon-trash-2" href="javascript:;"></a>
                                <a action="<?=$basepath?>_edit?id=<?=$v['id']?>" title="编辑" class="mainFrame button icon-edit" href="javascript:;"></a>
                            </td>
                        </tr>
                        <?
                    }
                    }
                    ?>
                <? } ?>
            </table>
        </div>
    </div>
</div>